var e = require("../../../@babel/runtime/helpers/interopRequireDefault"), t = e(require("../../../@babel/runtime/regenerator")), a = require("../../../@babel/runtime/helpers/asyncToGenerator"), n = e(require("../../../utils/api")), r = getApp();

Page({
    data: {
        statusBarHeight: r.globalData.statusBarHeight,
        anonymous: !1
    },
    onLoad: function(e) {},
    bindFormSubmit: function(e) {
        var r = this;
        return a(t.default.mark(function a() {
            var o;
            return t.default.wrap(function(t) {
                for (;;) switch (t.prev = t.next) {
                  case 0:
                    return o = wx.getStorageSync("openid"), t.prev = 1, t.next = 4, n.default.newQuestion({
                        openid: o,
                        anonymous: r.data.anonymous,
                        content: e.detail.value.content,
                        baseParentId: 0
                    });

                  case 4:
                    t.sent, wx.navigateBack({
                        delta: 1
                    }), t.next = 11;
                    break;

                  case 8:
                    t.prev = 8, t.t0 = t.catch(1), console.log(t.t0);

                  case 11:
                  case "end":
                    return t.stop();
                }
            }, a, null, [ [ 1, 8 ] ]);
        }))();
    },
    radioChange: function() {
        this.setData({
            anonymous: !this.data.anonymous
        });
    }
});